﻿using System.Threading.Tasks;
using TimServerSDK.Core;
using TimServerSDK.Core.Enums;
using TimServerSDK.Friends.Dtos;

namespace TimServerSDK.Friends
{
    /// <summary>
    /// 关系链管理
    /// </summary>
    public interface IFriendTimServerApi
    {
        /// <summary>
        /// 添加好友
        /// https://cloud.tencent.com/document/product/269/1643
        /// </summary>
        /// <param name="fromAccount">需要为该 UserID 添加好友</param>
        /// <param name="addFriendItem">好友结构体对象</param>
        /// <param name="addType">加好友方式</param>
        /// <param name="forceAddFlags">管理员强制加好友标记：1表示强制加好友，0表示常规加好友方式</param>
        /// <returns></returns>
        Task<TimServerResult> AddAsync(string fromAccount, AddFriendItemDto[] addFriendItem, TimServerFriendAddType addType = TimServerFriendAddType.Add_Type_Both, int forceAddFlags = 0);

        /// <summary>
        /// 删除好友
        /// https://cloud.tencent.com/document/product/269/1644
        /// </summary>
        /// <param name="fromAccount"></param>
        /// <param name="toAccount"></param>
        /// <param name="deleteType"></param>
        /// <returns></returns>
        Task<TimServerResult> DeleteAsync(string fromAccount, string[] toAccount, TimServerFriendDeleteType deleteType = TimServerFriendDeleteType.Delete_Type_Both);

        /// <summary>
        /// 拉取好友
        /// https://cloud.tencent.com/document/product/269/1647
        /// </summary>
        /// <param name="fromAccount"></param>
        /// <param name="startIndex"></param>
        /// <param name="standardSequence"></param>
        /// <param name="customSequence"></param>
        /// <returns></returns>
        Task<GetFriendResultDto> GetAsync(string fromAccount, int startIndex, int? standardSequence = null, int? customSequence = null);
    }
}
